package com.mrobuy.jdvc.dao.impl;

import com.mrobuy.jdvc.dao.VCPicApplyDao;
import com.mrobuy.jdvc.entity.VCFeature;
import com.mrobuy.jdvc.entity.VCPrimaryPicApply;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.stereotype.Repository;

@Repository("vcPicApplyDao")
public class VCPicApplyDaoImpl extends CommonDaoImpl implements VCPicApplyDao {

    private static Logger LOG = LoggerFactory.getLogger(VCPicApplyDao.class);

    @Override
    public VCPrimaryPicApply load(String wareId) {
        try {
            VCPrimaryPicApply task = (VCPrimaryPicApply)getJdbcTemplate().queryForObject("select * from VC_PIC_APPLY where WAREID = ?", new Object[]{wareId}, new BeanPropertyRowMapper(VCPrimaryPicApply.class));
            return task;
        } catch (Exception e) {
            LOG.error(e.getMessage());
        }

        return null;
    }
}
